import Mock from 'mockjs'

export default {
    // 创建预约
    createBooking: () => Mock.mock({
        status: true,
        code: 0,
        message: '预约申请已提交',
        data: {
            id: '@id'
        }
    }),

    // 获取我的预约
    getMyBookings: () => Mock.mock({
        status: true,
        code: 0,
        message: null,
        data: {
            total: 15,
            'list|5-10': [{
                id: '@id',
                room: '@ctitle(5,10)',
                date: '@date("yyyy-MM-dd")',
                startTime: '@time("HH:mm")',
                endTime: '@time("HH:mm")',
                purpose: '@cparagraph(1)',
                'status|0-3': 0,
                createTime: '@datetime'
            }]
        }
    }),

    // 成员端设备保修
    reportDeviceIssue: () => Mock.mock({
        status: true,
        code: 0,
        message: '保修提交成功，请等待处理',
        data: null
    }),

    // 管理员端获取设备保修列表
    getDeviceReportList: () => Mock.mock({
        status: true,
        code: 0,
        message: null,
        data: {
            total: 15,
            'list|5-10': [
                {
                    id: '@id',
                    room: '@ctitle(5,10)',
                    deviceName: '@ctitle(3,5)',
                    description: '@cparagraph(1)',
                    'status|0-1': 0,
                    createTime: '@datetime'
                }
            ]
        }
    }),

    // 管理员端处理设备保修
    handleDeviceReport: () => Mock.mock({
        status: true,
        code: 0,
        message: '处理成功',
        data: null
    }),

    // 修改预约
    updateBooking: () => Mock.mock({
        status: true,
        code: 0,
        message: '预约修改成功',
        data: null
    }),

    // 取消预约
    cancelBooking: () => Mock.mock({
        status: true,
        code: 0,
        message: '预约已取消',
        data: null
    }),

    // 转让预约
    transferBooking: () => Mock.mock({
        status: true,
        code: 0,
        message: '转让申请已提交',
        data: null
    })
}